package Loaders;

import java.awt.image.BufferedImage;
import java.io.IOException;

import javax.imageio.ImageIO;

public class ImgLoader {
	
	public ImgLoader (){
		
	}
	
	public BufferedImage AbreImagem(String path){
		BufferedImage image = null;
		try {
			BufferedImage imgtmp = ImageIO.read( getClass().getResource(path) );
			image = new BufferedImage(imgtmp.getWidth(), imgtmp.getHeight(), BufferedImage.TYPE_INT_ARGB);
			image.getGraphics().drawImage(imgtmp, 0,0,null);
			imgtmp = null;
		} catch (IOException e) {
			e.printStackTrace();
		}
		return image;
	}
}
